package org.plex.util;
import com.adobe.idp.um.api.UMException;
import com.adobe.idp.um.api.UMLocalUtils;

/***
 * 
 * @author 黄卫立
 * 系统检测类
 */
public class CheckUtil {
	private static boolean isFristCheck=true;
	private static boolean isVM=false;
	/***
	 * 判断是否在系统环境中运行,用于区别调用系统函数的环境
	 * @return isVM
	 */
	public static boolean isInVM()
	{
		if(isFristCheck)
		{
			try {
				UMLocalUtils.getSystemContext();
				isVM=true;
			} catch (UMException e) {
				isVM=false;
			}
			isFristCheck=false;
		}
		return isVM;
	}
}
